Skip to content

Conversation

bluelovers
Copy link

BREAKING CHANGE: instanceof will be first class

import { bases, isInstanceOf } from '../index';

class D extends bases(TypeError, Array) {

	constructor () {
		super(
			new TypeError(),
			new Array(),
		)
	}

	getC () {
		return this.bases[0].name + "@D";
	}
}

let e = new D();

console.log(e)

console.dir(D)

console.dir(e instanceof TypeError)
console.dir(e instanceof Array)
console.dir(e instanceof D)

console.dir(isInstanceOf(e, TypeError))
console.dir(isInstanceOf(e, Array))
console.dir(isInstanceOf(e, D))

BREAKING CHANGE: instanceof will be first class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant